Skip to content

Stop asking you to re-identify your athlete after every detection run - #20

Merged
ralyodio merged 1 commit into
masterfrom
rebind-athlete
Aug 10, 2026
Merged

ralyodio merged 1 commit into
masterfrom
rebind-athlete

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

You have identified Sam three times tonight. The last one came after a ten-minute detection pass and was thrown away by the next.

That is my fix from #17 creating friction: replacing a video's tracks assigns new ids, and focal_track_id pointed at a row that no longer existed, so the binding had to be cleared.

Ids don't survive a re-detection, but positions do. The athlete was in the same place on the same frames whichever pass observed them. So bindings are now snapshotted as geometry before the delete and re-attached afterwards.

Matching is mean box overlap across shared frames:

  • zero for anyone who was never on screen at the same time
  • zero for anyone standing elsewhere on the court at that moment
  • discounted when built on almost no shared frames — a single well-aligned frame is not evidence

Below the threshold it still says so plainly and asks you. A re-bind that silently picks the wrong child is worse than being asked again.

Multi-track selections survive too: every fragment you picked is matched independently, so an athlete stitched from six tracks comes back stitched.

The log gains re-identified 1 athlete(s) across 4 new track(s) in place of the old instruction to go and do it yourself.

Verification

443 tests pass (6 new), lint and typecheck clean. The matching rule is tested against the cases that would produce a confident wrong answer — a stranger in the same place an hour later, a stranger across the court at the same instant, and a one-frame coincidence.

Replacing a video's tracks assigns new ids, so the one piece of work only a
human can do was thrown away every run. Three re-identifications in one
evening, the last after a ten-minute detection pass, for a project with one
athlete in it.

Ids do not survive a re-detection but positions do: the athlete was in the
same place on the same frames whichever pass observed them. Bindings are
snapshotted as geometry before the delete and re-attached afterwards by mean
box overlap across shared frames, which is zero for anyone who was never on
screen at the same time and near-zero for anyone standing elsewhere. A match
built on almost no shared frames is discounted rather than trusted, because a
re-bind that silently picks the wrong child is worse than being asked again —
and anything below the threshold still says so plainly.

Multi-track selections are preserved too: every fragment the user picked is
matched independently, so an athlete stitched from six tracks comes back
stitched.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@ralyodio
ralyodio merged commit 9b77375 into master Aug 10, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant